"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const block_editor_1=require("@wordpress/block-editor"),element_1=require("@wordpress/element"),components_1=require("@wordpress/components"),navigation_1=require("@woocommerce/navigation"),core_data_1=require("@wordpress/core-data"),notice_1=require("../../components/notice"),utils_1=require("../../utils");function Edit({attributes:e}){const t=(0,block_editor_1.useBlockProps)(),{buttonText:o,content:r,title:i,type:n="info"}=e,[s]=(0,core_data_1.useEntityProp)("postType","product","attributes"),a=(0,utils_1.hasAttributesUsedForVariations)(s);return(0,element_1.createElement)("div",{...t},a&&(0,element_1.createElement)(notice_1.Notice,{content:r,title:i,type:n},(0,element_1.createElement)(components_1.Button,{isSecondary:!0,onClick:()=>(0,navigation_1.navigateTo)({url:(0,navigation_1.getNewPath)({tab:"variations"})})},o)))}exports.Edit=Edit;